<include file="public@header" />
<style>html {background-color: #ffffff;}</style>
</head>
<body>
	<div class="layui-fluid">
		<form method="post" class="layui-form js-ajax-form" style="margin-top:20px ;" action="{:url('finefood.category/addPost')}">
			<div class="layui-col-md12">
				<div class="layui-card">
					<div class="layui-tab layui-tab-brief">
						<ul class="layui-tab-title">
							<li ><a href="{:url('finefood.category/index')}">列表</a></li>
							<li class="layui-this"><a >{:lang('ADD')}</a></li>
						</ul>
					</div>

					<div class="layui-card-body">
						<div class="layui-form-item">
							<label for="input-name" class="layui-form-label"><span class="form-required">*</span>名称</label>
							<div class="layui-input-block">
								<input type="text" class="layui-input" id="input-name" name="name" required>
							</div>
						</div>
						<div class="layui-form-item pid_bd pid_0">
							<label class="layui-form-label">图标</label>
							<div class="layui-input-block">
								<input type="hidden" name="thumb" id="thumbnail" value="">
								<a href="javascript:uploadOneImage('图片上传','#thumbnail');">
									<img src="__TMPL__/public/assets/images/default-thumbnail.png" id="thumbnail-preview" style="cursor: pointer;max-width:150px;max-height:150px;"/>
								</a>
								<div class="layui-col-md12" style="margin-top: 10px">
									<input type="button" class="layui-btn layui-btn-sm layui-btn-normal"
										   onclick="$('#thumbnail-preview').attr('src','__TMPL__/public/assets/images/default-thumbnail.png');$('#thumbnail').val('');return false;"
										   value="取消图片">
								</div>
							</div>
						</div>
						<div class="layui-form-item">
							<div class="layui-input-block">
								<button type="submit" class="layui-btn js-ajax-submit">{:lang('ADD')}</button>
								<a class="layui-btn layui-btn-primary btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
							</div>
						</div>
					</div>
				</div>
			</div>
		</form>
	</div>
	<include file="public@script"/>

</body>
</html>